﻿using System;
using System.Collections.Generic;
using System.Linq;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository
{
    using System.Linq.Expressions;

    public interface ISecurityClassUpdatableRepository : IUpdatableRepository<SecurityClass>, ISecurityClassRepository
    {
        
    }

    public interface IUpdatableRepository<T>
    {
        /// <summary>
        ///     Save new Currencies in DataBase and return full list of elements
        /// </summary>
        /// <param name="items"></param>
        /// <returns></returns>
        List<T> SaveNew(IEnumerable<T> items);

        void Update(T item);

        void Merge(IEnumerable<T> toList);
    }

    public interface ISecurityClassRepository
    {
        List<T> GetList<T>(Func<IQueryable<SecurityClass>, IEnumerable<T>> f);

        SecurityClass Get(Expression<Func<SecurityClass, bool>> func);       
    }
}